package xin.mashibo.pattern.factorymethod;

/**
 * 工厂方法执行类
 *
 * @author MaShibo
 * 日期 :  2019/1/22
 */
public class Main {

    public static void main(String[] args) {
        Factory factory = new IDCardFactory();
        Product card1 = factory.create("小明");
        Product card2 = factory.create("小红");
        Product card3 = factory.create("小刚");
        card1.use();
        card2.use();
        card3.use();
    }

}
